<?php foreach ($this->friends as $friend):?>
	<?php $cur_user_id = Zend_Auth::getInstance()->getIdentity()->id;?>
	<?php $user_id_model = ($friend->user_id == $cur_user_id ? $friend->user_friend : $friend->user_id)?>
	<?php $model_user = new Model_User($user_id_model)?>
	
	<?php if($model_user->checkOnline($user_id_model)):?>
	
			<a
			href="<?php
		    echo $this->url(array('controller' => $model_user->login, 'action' => null, 'request'=>null),"default")?>"><?php
		    echo $model_user->login
		    ?></a> 
			  
			
			<a
			href="<?php
		    echo $this->url(array('controller' => 'friend', 'action' => 'remove', 'request'=>$user_id_model),"default")?>"><?php
		    echo $this->translate("Remove from friends");
		    ?></a>
		    <br/>
    
    <?php endif;?>
<?php endforeach;?>